| Total Complexity | 2 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm'; |
||
| 2 | |||
| 3 | @Entity() |
||
| 4 | export class InterestRate { |
||
| 5 | @PrimaryGeneratedColumn('uuid') |
||
| 6 | private id: string; |
||
| 7 | |||
| 8 | @Column({ type: 'integer', nullable: false, comment: 'Stored in base 100' }) |
||
| 9 | private rate: number; |
||
| 10 | |||
| 11 | @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }) |
||
| 12 | private createdAt: Date; |
||
| 13 | |||
| 14 | constructor(rate: number) { |
||
| 15 | this.rate = rate; |
||
| 16 | } |
||
| 17 | |||
| 18 | public getId(): string { |
||
| 19 | return this.id; |
||
| 20 | } |
||
| 21 | |||
| 22 | public getRate(): number { |
||
| 23 | return this.rate; |
||
| 24 | } |
||
| 26 |